<template>
  <!-- 物业大数据分析 -->
  <div class="propertyBDA">
    <ServiceSystem />
    <LeftRight>
      <template #left>
        <Allcom :_Info="leftInfo" />
      </template>
      <template #center> </template>
      <template #right>
        <Allcom :_Info="rightInfo" />
      </template>
    </LeftRight>
  </div>
</template>

<script>
export default {
  name: "propertyBDA",
  data() {
    return {
      leftInfo: [
        {
          title: "今日设备统计",
          type: "horizontalBarChart",
          datas: {
            datas2: [
              {
                name: "设备总数",
                value: 10900,
              },
            ],
            data: [
              {
                name: "在线",
                value: 9672,
              },
              {
                name: "离线",
                value: this.$randomNumer(0, 100),
              },
              {
                name: "告警",
                value: this.$randomNumer(0, 100),
              },
              {
                name: "故障",
                value: this.$randomNumer(0, 50),
              },
            ],
          },
        },
        {
          title: "近七天工单统计",
          type: "SingleBarChart",
          datas: {
            // eHeight: 220,
            // xAxisD: ["6.26", "6.27", "6.28", "6.29", "6.30", "7.1", "7.2"],
            xAxisD: this.$funDateArr(-7),
            datas2: [
              {
                name: "工单数",
                value: 1067,
              },
              {
                name: "未处理工单数",
                value: 129,
              },
            ],
            units: ["日期", "个"],
            datas: [[90, 190, 100, 70, 200, 100, this.$randomNumer(20, 50)]],
          },
        },
      ],
      // 右侧
      rightInfo: [
        {
          title: "工单汇总",
          type: "TableList",
          datas: {
            eHeight: 590,
            padding: null,
            pageSize: 13,
            header: {
              orderType: "工单类型",
              createrName: "工单创建人",
              hdPeople: "处理人",
              state: "状态",
              handle: "操作",
            },
            tabelD: [
              {
                orderType: "物业保修",
                createrName: "谢彤",
                hdPeople: "李杰",
                state: "处理中",
                hdInfo: "已联系电梯维修人员处理",
                creatTime: "2021-07-11 10:34:14",
                hdTime: "2021-07-11 16:34:05",
                hdImg: require("@/assets/img/datas/pp_3.png"),
                workOrderImg: require("@/assets/img/datas/pp_2.png"),
                workOrderInfo: "2号电梯下降时出现震动",
                workOrderNum: "CW-KJH-34523",
                workOrderFile: "电梯投诉信件.doc",
              },
              {
                orderType: "会议室预定",
                createrName: "陈云芳",
                hdPeople: "梁茜",
                state: "超时",
                hdInfo: "已申请预约",
                creatTime: "2021-07-10 16:23:43",
                hdTime: "2021-07-11 15:23:22",
                hdImg: null,
                workOrderImg: null,
                workOrderInfo: "会议室预定",
                workOrderNum: "FD-JKGH-344",
                workOrderFile: null,
              },
              {
                orderType: "车位申请",
                createrName: "夏少东",
                hdPeople: "李杰",
                state: "处理中",
                hdInfo: "已申请办理",
                creatTime: "2021-07-09 16:23:53",
                hdTime: "2021-07-11 17:32:34",
                hdImg: null,
                workOrderImg: null,
                workOrderInfo: "车位申请",
                workOrderNum: "TCW-JGJ-34324",
                workOrderFile: null,
              },
              {
                orderType: "IT报修",
                createrName: "吴莉莉",
                hdPeople: "李杰",
                state: "完成",
                hdInfo: "已处理设备故障",
                creatTime: "2021-07-09 16:34:22",
                hdTime: "2021-07-10 15:25:54",
                hdImg: null,
                workOrderImg: null,
                workOrderInfo: "电脑死机",
                workOrderNum: "JHJ-UOOI-43534",
                workOrderFile: null,
              },
              {
                orderType: "入驻办理",
                createrName: "梁霞",
                hdPeople: "徐彩芳",
                state: "完成",
                hdInfo: "入驻办理成功",
                creatTime: "2021-07-09 10:03:15",
                hdTime: "2021-07-10 10:33:42",
                hdImg: null,
                workOrderImg: null,
                workOrderInfo: "入驻办理",
                workOrderNum: "DSD-LKJ-657",
                workOrderFile: null,
              },
              {
                orderType: "广告位申请",
                createrName: "黄欣",
                hdPeople: "梁茜",
                state: "完成",
                hdInfo: "广告位申请成功",
                creatTime: "2021-07-09 14:43:32",
                hdTime: "2021-07-10 17:33:54",
                hdImg: null,
                workOrderImg: null,
                workOrderInfo: "广告位申请",
                workOrderNum: "HH-JKHG-8978",
                workOrderFile: null,
              },
              {
                orderType: "物业保修",
                createrName: "郭易财",
                hdPeople: "李杰",
                state: "完成",
                hdInfo: "已联系电梯维修人员处理",
                creatTime: "2021-07-05 12:21:23",
                hdTime: "2021-07-06 15:33:02",
                hdImg: require("@/assets/img/datas/pp_3.png"),
                workOrderImg: require("@/assets/img/datas/pp_2.png"),
                workOrderInfo: "4号电梯摄像头故障",
                workOrderNum: "HKU-ERT-987056",
                workOrderFile: null,
              },
              {
                orderType: "IT报修",
                createrName: "胡思安",
                hdPeople: "李杰",
                state: "完成",
                hdInfo: "维修人员已处理",
                creatTime: "2021-07-05 12:21:23",
                hdTime: "2021-07-06 15:33:02",
                hdImg: null,
                workOrderImg: null,
                workOrderInfo: "电脑自动关机 无法开启",
                workOrderNum: "POJ-XZDF-8970",
                workOrderFile: null,
              },
              {
                orderType: "入驻办理",
                createrName: "成佳妮",
                hdPeople: "梁茜",
                state: "完成",
                hdInfo: "入驻办理成功",
                creatTime: "2021-07-05 16:11:32",
                hdTime: "2021-07-06 15:22:42",
                hdImg: null,
                workOrderImg: null,
                workOrderInfo: "入驻办理",
                workOrderNum: "YTYU-MJJ-7878",
                workOrderFile: null,
              },
              {
                orderType: "物业保修",
                createrName: "刘虎娣",
                hdPeople: "周灿灿",
                state: "完成",
                hdInfo: "已联系电梯维修人员处理",
                creatTime: "2021-07-06 16:43:44",
                hdTime: "2021-07-07 18:32:22",
                hdImg: require("@/assets/img/datas/pp_3.png"),
                workOrderImg: require("@/assets/img/datas/pp_2.png"),
                workOrderInfo: "5号电梯升降不稳定",
                workOrderNum: "RTY-TYTI-8970",
                workOrderFile: null,
              },
              {
                orderType: "入驻办理",
                createrName: "谭珏",
                hdPeople: "李杰",
                state: "完成",
                hdInfo: "入驻办理完成",
                creatTime: "2021-07-04 09:37:11",
                hdTime: "2021-07-05 18:13:56",
                hdImg: null,
                workOrderImg: null,
                workOrderInfo: "入驻办理",
                workOrderNum: "DEH-UIU-79080",
                workOrderFile: null,
              },
              {
                orderType: "IT报修",
                createrName: "梁海山",
                hdPeople: "李杰",
                state: "完成",
                hdInfo: "维修人员已处理",
                creatTime: "2021-07-03 13:32:11",
                hdTime: "2021-07-04 17:21:02",
                hdImg: null,
                workOrderImg: null,
                workOrderInfo: "IT部-电脑卡顿彩屏",
                workOrderNum: "GRF-UJTI-0980",
                workOrderFile: null,
              },
              {
                orderType: "会议室预定",
                createrName: "李贺",
                hdPeople: "徐彩芳",
                state: "梁茜",
                hdInfo:
                  "会议室预定失败，当前时间已有预定，请重新选择时间段预定",
                creatTime: "2021-07-03 17:53:31",
                hdTime: "2021-07-04 11:42:21",
                hdImg: null,
                workOrderImg: null,
                workOrderInfo: "会议室预定",
                workOrderNum: "FGD-POPO-0980",
                workOrderFile: null,
              },
              {
                orderType: "物业保修",
                createrName: "周峰",
                hdPeople: "徐彩芳",
                state: "完成",
                hdInfo: "维修人员已处理",
                creatTime: "2021-07-02 12:21:23",
                hdTime: "2021-07-0415:33:02",
                hdImg: require("@/assets/img/datas/pp_3.png"),
                workOrderImg: require("@/assets/img/datas/pp_2.png"),
                workOrderInfo: "4号电梯运行不畅",
                workOrderNum: "CW-FEW-2343",
                workOrderFile: null,
              },
              {
                orderType: "会议室预定",
                createrName: "邵文",
                hdPeople: "李杰",
                state: "完成",
                hdInfo: "会议室预定成功",
                creatTime: "2021-07-02 12:21:23",
                hdTime: "2021-07-03 15:33:02",
                hdImg: null,
                workOrderImg: null,
                workOrderInfo: "会议室预定",
                workOrderNum: "EET-FFE-23456",
                workOrderFile: null,
              },
              {
                orderType: "车位申请",
                createrName: "周磊",
                hdPeople: "李杰",
                state: "完成",
                hdInfo: "车位申请成功",
                creatTime: "2021-07-02 12:21:23",
                hdTime: "2021-07-03 15:33:02",
                hdImg: null,
                workOrderImg: null,
                workOrderInfo: "车位申请",
                workOrderNum: "EFS-BHG-678",
                workOrderFile: null,
              },
              {
                orderType: "会议室预定",
                createrName: "章经信",
                hdPeople: "李兰喜",
                state: "完成",
                hdInfo: "会议室预定取消",
                creatTime: "2021-07-01 12:21:23",
                hdTime: "2021-07-03 15:33:02",
                hdImg: null,
                workOrderImg: null,
                workOrderInfo: "会议室预定",
                workOrderNum: "HUJ-IOU-89897",
                workOrderFile: null,
              },
              {
                orderType: "物业保修",
                createrName: "钟伟",
                hdPeople: "徐彩芳",
                state: "完成",
                hdInfo: "电梯维修人员已处理",
                creatTime: "2021-07-01 12:21:23",
                hdTime: "2021-07-02 15:33:02",
                hdImg: require("@/assets/img/datas/pp_3.png"),
                workOrderImg: require("@/assets/img/datas/pp_2.png"),
                workOrderInfo: "大堂入口温度探测器失灵",
                workOrderNum: "RFRT-FGTYF-223",
                workOrderFile: null,
              },
              {
                orderType: "车位申请",
                createrName: "唐艳强",
                hdPeople: "徐彩芳",
                state: "完成",
                hdInfo: "车位申请成功",
                creatTime: "2021-07-01 12:21:23",
                hdTime: "2021-07-04 15:33:02",
                hdImg: null,
                workOrderImg: null,
                workOrderInfo: "车位申请",
                workOrderNum: "UHLK-TJJ-98008",
                workOrderFile: null,
              },
              {
                orderType: "物业保修",
                createrName: "李玉森",
                hdPeople: "徐彩芳",
                state: "完成",
                hdInfo: "电梯维修人员已处理",
                creatTime: "2021-07-01 12:21:23",
                hdTime: "2021-07-01 15:33:02",
                hdImg: require("@/assets/img/datas/pp_3.png"),
                workOrderImg: require("@/assets/img/datas/pp_2.png"),
                workOrderInfo: "6号电梯上升时出现震动",
                workOrderNum: "GHH-IIO-4634",
                workOrderFile: null,
              },
              {
                orderType: "物业保修",
                createrName: "陈云芳",
                hdPeople: "李杰",
                state: "完成",
                hdInfo: "电梯维修人员已处理",
                creatTime: "2021-07-02 08:34:22",
                hdTime: "2021-07-02 18:23:33",
                hdImg: require("@/assets/img/datas/pp_3.png"),
                workOrderImg: require("@/assets/img/datas/pp_2.png"),
                workOrderInfo: "1号货梯故障",
                workOrderNum: "IYI-UIUJH-843",
                workOrderFile: null,
              },
              {
                orderType: "物业保修",
                createrName: "张仁姣",
                hdPeople: "李杰",
                state: "完成",
                hdInfo: "电梯维修人员已处理",
                creatTime: "2021-06-30 15:22:44",
                hdTime: "2021-07-01 14:23:43",
                hdImg: require("@/assets/img/datas/pp_3.png"),
                workOrderImg: require("@/assets/img/datas/pp_2.png"),
                workOrderInfo: "3号电梯门感应故障",
                workOrderNum: "IJJ-JLK-2432",
                workOrderFile: null,
              },
              {
                orderType: "车位申请",
                createrName: "付春辉",
                hdPeople: "李杰",
                state: "完成",
                hdInfo: "车位申请成功",
                creatTime: "2021-07-01 10:34:02",
                hdTime: "2021-07-01 14:46:43",
                hdImg: null,
                workOrderImg: null,
                workOrderInfo: "车位申请",
                workOrderNum: "YUI-YU-737",
                workOrderFile: null,
              },
            ],
          },
        },
      ],
    };
  },
  created() {
    this.leftInfo[1].datas.datas2[0].value = this.$arrAdd(
      this.leftInfo[1].datas.datas[0]
    );
    this.leftInfo[0].datas.data[0].value =
      parseInt(this.leftInfo[0].datas.datas2[0].value) -
      parseInt(this.leftInfo[0].datas.data[1].value) -
      parseInt(this.leftInfo[0].datas.data[2].value) -
      parseInt(this.leftInfo[0].datas.data[3].value);
  },
  methods: {},
};
</script>

<style lang="less" scoped></style>
